From 5c1fcb4a5552a813b772849a346556cb1d2ac868 Mon Sep 17 00:00:00 2001 From: boats Date: Thu, 5 Oct 2017 23:13:53 +0000 Subject: [PATCH] Get features in virtual manifest. --- src/cargo/util/toml/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 487d46f93..c5566b9cb 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -717,6 +717,10 @@ impl TomlManifest { let mut nested_paths = Vec::new(); let mut warnings = Vec::new(); let mut deps = Vec::new(); + let empty = Vec::new(); + let cargo_features = me.cargo_features.as_ref().unwrap_or(&empty); + let features = Features::new(&cargo_features, &mut warnings)?; + let (replace, patch) = { let mut cx = Context { pkgid: None, @@ -726,7 +730,7 @@ impl TomlManifest { config: config, warnings: &mut warnings, platform: None, - features: &Features::default(), // @alex: is this right? + features: &features, root: root }; (me.replace(&mut cx)?, me.patch(&mut cx)?) -- 2.30.2